package com.leyou.item.dto;


import com.leyou.item.pojo.Category;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author:yanjizhw@163.com
 * @date:2019-10-11 11:51
 * 描述:
 * @since:1.0.0
 */
@Getter
@Setter
@ToString
public class CategoryLevelDto extends Category {

    private List<CategoryLevelDto> categoryList = new ArrayList<>();

    public static CategoryLevelDto adapt(Category category){
        CategoryLevelDto dto = new CategoryLevelDto();
        BeanUtils.copyProperties(category, dto);
        return dto;
    }
}
